import { defineConfig } from 'umi';
import routes from './routes';

export default defineConfig({
  routes,
  npmClient: 'yarn',
  define: {
    'process.env.MY_TOKEN': process.env.MY_TOKEN,
    'process.env.UMI_DEV': 'DEV',
  },
  hash: true, //配置了之后，dist目录下生成的文件包含.hash后缀，如：logo.[hash字符].png。通常用于增量发布和避免浏览器加载缓存。
  plugins: [
    '@umijs/plugins/dist/initial-state',
    '@umijs/plugins/dist/model',
    '@umijs/plugins/dist/layout',
    '@umijs/plugins/dist/access',
    '@umijs/plugins/dist/dva',
    '@umijs/plugins/dist/request',
  ], // 可插拔。配置开启model,layout插件
  model: {},
  layout: {},
  initialState: {},
  access: {},
  dva: {},
  request: {},
});
